<template>
<!--    必须有的组件的声明
        同时，模版里面只能有一个div-->
    <div id="app">
        <h1>自定义的一个demo01的组件</h1>
        <h3>{{username}}</h3>
        <button @click="changeName">修改名字</button>
<!--        <MyCount>-->
<!--        </MyCount>-->
        <Brother1></Brother1>
        <Brother2></Brother2>
    </div>
</template>

<script>
    import Brother1 from "@/components/Brother1";
    import Brother2 from "@/components/Brother2";
    export default {
        name: "demo01",
        components:{
          Brother2,Brother1
        },
        data(){
            return {
                username: 'laozhang'
            }
        },
        methods:{
            changeName(){
                this.username = 'laizo'
            }
        }
    }
</script>

<style scoped>
    #app{
        background-color: #42b983;
    }
</style>